<%--
  Created by IntelliJ IDEA.
  User: cos
  Date: 2021/11/22
  Time: 9:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>index</h1>
<form action="/logout" method="post">
    <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
    <input type="submit" value="登录出" />
</form>
<hr>
<security:authorize access="hasAnyRole('ROLE_ADMIN')">
    欢迎回来,打工人 <a href="/xin">新增</a>
</security:authorize>
<security:authorize access="hasAnyRole('ROLE_USER')">
    欢迎回来,bb <a href="/chax">查询</a>
</security:authorize>
</body>
</html>
